<include file="public@header"/>
</head>
<body>
<div class="layui-fluid js-check-wrap">
    <div class="layui-card">
        <div class="layui-card-header well">
            <div class="layui-col-xs6">
                <h3>{:lang('ADMIN_SITE_INDEX')}</h3>
            </div>
            <div class="layui-col-xs6 text-right">
                <if condition="in_array('add', $actions)">
                    <a href="{:url('site/add')}" class="layui-btn layui-btn-normal">{:lang('ADMIN_SITE_ADD')}</a>
                </if>
            </div>
        </div>

        <div class="layui-card-body">
            <table class="layui-table">
                <thead>
                <tr>
                    <th width="40">ID</th>
                    <th>站点名称</th>
                    <th>站点域名</th>
                    <th width="160">{:lang('ACTIONS')}</th>
                </tr>
                </thead>
                <tbody>
                <foreach name="sites" item="vo">
                    <tr>
                        <td>{$vo.site_id}</td>
                        <td>{$vo.name}</td>
                        <td>{$vo.domain}</td>
                        <td>
                            <if condition="in_array('edit', $actions)">
                                <a class="layui-btn layui-btn-xs" href="{:url('site/edit',array('id'=>$vo['site_id']))}">{:lang('EDIT')}</a>
                            </if>
                            <if condition="in_array('delete', $actions)">
                                <a class="js-ajax-delete layui-btn layui-btn-danger layui-btn-xs" href="{:url('site/delete',array('id'=>$vo['site_id']))}">{:lang('DELETE')}</a>
                            </if>
                        </td>
                    </tr>
                </foreach>
                </tbody>
            </table>
        </div>
    </div>
</div>

<include file="public@footer"/>
